#include <iostream>

#define ROW_WIDTH 120
#define LIST_HIGHT 10

using namespace std;

namespace lst{    

    class MsgList
    {
    private:
        char _list_screen[LIST_HIGHT][ROW_WIDTH+1] = {0};
        const int _list_height = LIST_HIGHT;
        const int _row_width =  ROW_WIDTH;
        int _isTitle = 0;
        int _current_row = 0;
        int _data_rows = 0;

        void _show_hello();
        void _show_title();
        void _show_cmd();
        char ** _str_to_list_data_rows(const char* str);
        void _push_rows(const char ** str);
        void _list_up_play();
        void _clear_row(int row);
    public:
        MsgList(int isTitle);
        ~MsgList();

        void push(const char *str);
        void print_list();   
        void test();     
    };
}